Learn R Programming

MXM (version 0.9.7)

Interactive plot of an (un)directed graph: Interactive plot of an (un)directed graph

Description

Interactive plot of an (un)directed graph.

Usage

plotnetwork(G, titlos)

Arguments

G
The adjacency matrix as produced from mmhc.skel, pc.skel, pc.con or any other algorithm. This can correspond to an undirected, partially directed or a completely directed graph.
titlos
A character argument specifying the title of the graph, for example "PC network".

Value

The plot of the directed graph. This is interactive, in the sense that the user can "play" with it. Move the nodes, zoom it, strectch it etc.

Details

This visualises the directed graph.

See Also

mmhc.skel, nei, pc.skel, mb

Examples

Run this code
# simulate a dataset with continuous data
dataset <- matrix(runif(1000 * 20, 1, 100), nrow = 1000 ) 
a <- mmhc.skel(dataset, max_k = 3, threshold = 0.05, test = "testIndFisher", 
rob = FALSE, nc = 1) 
plotnetwork(a$G)
plotnetwork(a$G, titlos = "DAG skeleton")

Run the code above in your browser using DataLab